<?php 
  require_once('nav.php');
  //用户id是通过GET方法提交的   
   //根据用户id从数据库中查询用户的所有信息
   $id = $_GET['id'];  
   $sql = "select * from videotype where tid={$id}";   
   //$result = mysql_query($sql) or die('查询失败！'.mysql_error());   
   //$row = mysql_fetch_assoc($result);
   $row=fetch_one($sql);
  // $row = fetch_one($sql);
   //var_dump($row);   
  //将查询结果显示在表单中
 ?>

        <div class="col-sm-9 col-md-10">
        <h1 class="text-center">视频类别编辑</h1>
        <form method="post"  action="vtupdate.php"  enctype="multipart/form-data" class="form-horizontal">
          <input type="hidden" name="id" value="<?php echo $id; ?>">

          <div class="form-group">
              <label for="typename" class="col-md-2 col-xs-3 control-label">类别名称</label>
              <div class="col-md-10 col-xs-9">
                <input type="text" class="form-control" id="typename" placeholder="类别名称" name="typename" value="<?php $row['typename'];?>">
              </div>
          </div>

          
            <div class="form-group">
              <label class="col-md-2 col-xs-3 control-label"></label>
                <div class="col-md-10 col-xs-9">
            <button type="submit" class="btn btn-default">提交</button>
            <button type="reset" class="btn btn-default">重置</button>
              </div>
          </div>
        </form>
        </div>

<?php
  require_once('footer.php');
    ?>

